/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __PQ_Unit_H__
#define __PQ_Unit_H__

#include "ClientPrerequisites.h"
#include "SceneObject.h"

using namespace PQEngine;

namespace PQClient
{
	/*This class represent a game scene's unit.
	@note The Unit is the base class of all game participant.
	*/
	class Unit : public PQEngine::Object
	{
	public:
		enum Type
		{
			Unit_Unkown,

			Unit_Player_Destroyer,//player type 1
			Unit_Player_Vanquisher,//
			Unit_Player_Alchemist,


			Unit_NPC,
			Unit_Boid,


			Unit_Count
		};

		/*Construct the unit by the config file.
		@param scene The owner scene.
		@param unitName The unit name.
		@param fileName The name of the config file.
		*/
		Unit(Ogre::String name,PQEngine::SceneObject* scene, Unit::Type type);

		//update the unit
		virtual void update(float deltaT);

		Ogre::String getName();
		/*Get the MeshObject of the unit's main part
		*/
		virtual MeshObject* getMeshObject()=0;

		virtual void setVisible(bool visible);
	protected:
		PQEngine::SceneObject* _sceneObject;
		Unit::Type _type;
		Ogre::String _name;

	};
}
#endif
